@extends('admin.layout.layout')
@section('content')
   <div class="col-lg-12">
       <div class="panel panel-default">
        <div class="panel-heading">
            会员|管理员列表
        </div>
        <!-- /.panel-heading -->
         @if(session('error'))
              <div class="alert alert-danger alert-dismissable">
              <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
                <ul>
                 <li> {{session('error')}}</li>
                   
                </ul>
            </div> 
         @endif
         @if(session('success'))
            <div class="alert  alert-success alert-dismissable">
              <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
                <ul>
                 <li> {{session('success')}}</li>
                   
                </ul>
            </div> 
         @endif

        <div class="panel-body">
            <div class="dataTable_wrapper">
                    <div id="dataTables-example_wrapper" class="dataTables_wrapper form-inline dt-bootstrap no-footer">
			<!-- 分页搜索栏 -->
						  <div class="row">
						 
						    <form action="/admin/user/index" method="get">
						    <div class="col-sm-6">
							    <div id="dataTables-example_filter" class="dataTables_filter">
							        <label>会员名:
							          <input class="form-control input-sm" placeholder="" aria-controls="dataTables-example" type="search" name="keywords" value="{{$request['keywords'] or ''}}">&nbsp
							          <button class="btn btn-primary">搜索</button>
							        </label>
							    </div>
							    </div>
						    </form>
						  </div>
						  <div class="row">
						  
            <!-- 分页搜索栏end         -->
                 
            
                    <div class="panel-body">
                            <div class="table-responsive">
                                <table class="table table-striped table-bordered table-hover">
            <!-- 字段开始 -->
                                    <thead>
                                        <tr>
                                            <th>ID</th>
                                            <th>用户名</th>
                                            <th>手机号</th>
                                            <th>状态</th>
                                            <th>email</th>
                                            <th>添加时间</th>
                                            <th>操作</th>
                                        </tr>
                                    </thead>
            <!-- 字段开始end -->  
                                    <tbody>
            <!-- 循环体 -->
                                     @foreach($data as $k=>$v)
                                        <tr>
                                            <td>{{$v->id}}</td>
                                            <td>{{$v->username}}</td>
                                            <td>{{$v->phone}}</td>
                                            <td>{{$status_list[$v->status]}}</td>
                                            <td>{{$v->email}}</td>
                                            <td>{{$v->addtime}}</td>
                                            <td>
                                            <a href="/admin/user/del/{{$v->id}}">删除</a>
                                            &nbsp&nbsp&nbsp&nbsp
                                           <a href="/admin/user/edit/{{$v->id}}">编辑</a>
                                            </td>
                                        </tr>
                                    @endforeach
            <!-- 循环体end -->      
                                    </tbody>
                                </table>
                            </div>
                            <!-- /.table-responsive -->
                        </div>

                </table></div></div>
               

                <div class="row"><div class="col-sm-6">
                   <div class="dataTables_info" id="dataTables-example_info" role="status" aria-live="polite">
                   </div>
                </div>
                <div class="col-sm-6">
                     <div class="dataTables_paginate paging_simple_numbers" id="dataTables-example_paginate">
                        <ul class="pagination">
                            {!! $data->render() !!}
                        </ul>
                     </div>
                </div>
            </div>
            </div>
            </div>
            <!-- /.table-responsive -->
         
        </div>
        <!-- /.panel-body -->
       </div>
    <!-- /.panel -->
   </div>
@endsection